import Vue from 'vue'
import Vuex from 'vuex'
import { getItem } from '@/utils/storage.js'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    userInfo: getItem('userInfo') || { }
  },
  mutations: {
    setUser (state, userInfo) {
      state.userInfo = userInfo
    }
  },
  actions: {
  },
  modules: {
  }
})
